#include<iostream>
using namespace std;
typedef long long LL;
const int N = 2e5 + 10;
LL sz[N];
int p[N];
int n, m;
int find(int x)
{
	if (x != p[x])p[x] = find(p[x]);
	return p[x];
}
int main()
{
	cin >> n >> m;
	LL ans = 0;
	for (int i = 1; i <= n; i++) {
		p[i] = i;
		sz[i] = 1;
	}
	if (!m) {
		cout << 1 << endl;
		return 0;
	}
	while (m--) {
		int x, y;
		scanf_s("%d%d", &x, &y);	
		int px = find(x);
		int py = find(y);
		if (px != py) {
			p[px] = py;
			sz[py] += sz[px];
			ans = max(ans, sz[py]);
		}
	}
	cout << ans << endl;
	return 0;
}